Software Development
Defensive Programming in iOS
Errors, Exceptions, and Testing
Managing Network Interaction
Protecting Data in iOS Apps
Thinking Defensively about Functions, Methods, and Input

Errors, Exceptions, and Testing

Course Number:
sd_dpio_a03_it_enus
Lesson Objectives

Errors, Exceptions, and Testing

  • start the course
  • use error information returned indirectly from methods
  • test for specific kinds of errors based on domains and codes
  • create and return error objects from custom methods
  • use alert views to inform end users of error information
  • use an underlying error object to find out more detail about an error that has occurred
  • create and throw/raise exceptions in iOS apps
  • catch and handle exceptions in iOS apps
  • use the @finally directive to guarantee code execution
  • convert a raised exception to an error when appropriate
  • capture and handle specific types of exceptions locally
  • create an XCTestCase Class using Xcode and Objective-C
  • create an XCTestCase Class using Xcode and Swift
  • create, execute, and check results of unit tests using Xcode and Objective-C
  • creating and executing unit tests in Swift
  • unit test private methods in custom classes
  • how to create tests that measure execution time of code
  • create and execute asynchronous tests
  • recognize how to initiate the creation of an automated test of an iOS app
  • access interface elements by navigating the element hierarchy
  • use accessibility labels to interact with iOS app elements when automation testing
  • select and tap interface elements in automation testing
  • define pass and fail benchmarks for automation testing
  • use the logElementTree method to understand an app's view hierarchy
  • import previously created automation scripts for reuse
  • create assertions using NSAssert
  • create assertions using the assert function
  • create assertions in Swift
  • work with creating and managing errors and exceptions

Overview/Description
Defensive Programming in iOS has to do with using coding practices and techniques to create apps, that are reliable, resilient, and easily testable. This course will teach you about thinking defensively in your approach to errors and exception handling, and also how to create automated tests for iOS apps.

Target Audience
iOS developers who have experience creating apps using the Objective-C and Swift languages, and who are interested in learning to employ defensive programming techniques for iOS apps

Managing Network Interaction

Course Number:
sd_dpio_a02_it_enus
Lesson Objectives

Managing Network Interaction

  • start the course
  • create a TCP client connection from an iOS app
  • send and receive data over a TCP connection in an iOS app
  • determine when an iOS app can and cannot access the Internet
  • determine when an iOS app can and cannot reach a specific IP address
  • determine when an iOS app can and cannot access the Internet
  • install and configure the network link conditioner to be able to test iOS apps in different connection conditions
  • use CF functions to encode URLs
  • use CF functions to decode URLs
  • use NSURLConnection to make synchronous and asynchronous network calls
  • use NSURLConnection to make asynchronous network calls without using custom delegates
  • create and apply a configuration object to an NSURLSession instance
  • request a URL in a simple manner using NSURLSession and system delegates
  • request a URL in a flexible manner using NSURLSession and custom delegates
  • stop script execution in any HTML loaded into a WebView
  • disallow Internet traffic over cellular connections in an iOS app
  • capture and handle redirect responses from a server
  • use NSURLSession to reliably download and save files in an iOS app
  • use NSURLSession to handle users stopping and starting download operations
  • use NSURLSession to handle downloads that fail
  • use NSURLSession to upload files to a web server
  • use common techniques for managing network interaction

Overview/Description
Defensive programming in iOS has to do with using coding practices and techniques to create apps that are reliable, predictable, and resilient. This course will teach you about methods and best practices for interacting safely and easily with the Internet from within an iOS app.

Target Audience
iOS developers who have experience creating apps using the Objective-C and Swift languages, and who are interested in learning to employ defensive programming techniques for iOS apps.

Protecting Data in iOS Apps

Course Number:
sd_dpio_a04_it_enus
Lesson Objectives

Protecting Data in iOS Apps

  • start the course
  • obscure sensitive data from plain sight in an iOS app interface
  • use alert view styles to collect sensitive user data
  • obscure sensitive data when using alert controllers
  • use Touch ID authentication in iOS apps on supported devices
  • recognize how to write text data to files while reducing the risk of data corruption
  • recognize how to write binary data to files while reducing the risk of data corruption
  • use built-in hardware encryption to store text files securely on disk
  • use built-in hardware encryption to store binary files securely on disk
  • register for notifications and delegate methods that indicate when protected files change status
  • create and access protected files while an iOS device is in the background
  • securely store sensitive data using the iOS keychain
  • search and retrieve sensitive data from the iOS keychain
  • update sensitive data stored in the iOS keychain
  • remove sensitive data stored in the iOS keychain
  • define when keychain items are accessible depending on the lock status of an iOS device
  • use the Randomization Services API to generate random numbers
  • create an MD5 hash using the Common Crypto library
  • create an SHA hash using the Common Crypto library
  • use the RNCryptor library to encrypt and decrypt data in an iOS app
  • use the Certificate, Key, and Trust functions to generate an asymmetric key pair
  • use the public key of an asymmetric key pair to encrypt data
  • use the private key of an asymmetric key pair to decrypt data
  • create and manage iOS keychain items

Overview/Description
Defensive Programming in iOS has to do with using coding practices and techniques to create apps that are reliable and resilient. This course will teach some methods and practices that can be used to help protect data inputted, stored, and retrieved by iOS apps

Target Audience
iOS developers who have experience creating apps using the Objective-C and Swift languages, and who are interested in learning to employ defensive programming techniques for iOS apps

Thinking Defensively about Functions, Methods, and Input

Course Number:
sd_dpio_a01_it_enus
Lesson Objectives

Thinking Defensively about Functions, Methods, and Input

  • start the course
  • create code that handles file inputs to an iOS app
  • create code that handles url scheme inputs to an iOS app
  • validate user-provided input using Objective-C
  • use a real-time approach to validating user-provided input in Objective-C
  • use secure coding principles to guard against format string attacks
  • restrict free navigation around the Web based on user input in a UIWebView
  • use best practices to name functions and methods in Objective-C
  • use best practices to name accessor methods in Objective-C
  • use best practices to name delegate methods in Objective-C
  • reduce method complexity in iOS apps using Objective-C
  • overload a function to reduce code complexity in Swift
  • design functions that have a single and defined focus
  • identify and use different class naming standards in Objective-C
  • create and use constants in Objective-C
  • create and use constants in Swift
  • create and use resource files in an iOS app
  • easily store and retrieve data from the defaults database
  • recognize how using brackets can protect against potential bugs
  • design while loops that are not vulnerable to running forever
  • design for loops that are not vulnerable to running forever
  • identify and avoid bugs caused by altered loop variables
  • handle various types of inputs to an iOS app

Overview/Description
Defensive Programming in iOS has to do with using coding practices and techniques to create apps, that are reliable and resilient. In this course, you will learn about thinking defensively when creating functions and methods, and also when working with inputs to your programs.

Target Audience
iOS developers who have experience creating apps using the Objective-C and Swift languages, and who are interested in learning to employ defensive programming techniques for iOS apps

Close Chat Live